<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>伪造数据展示</title>
    <!-- 引入 Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f8f9fa;
            padding: 40px;
        }
        .container {
            max-width: 600px;
            margin: auto;
            background-color: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
            margin-bottom: 30px;
        }
        ul {
            list-style-type: none;
            padding-left: 0;
        }
        li {
            background-color: #e9ecef;
            margin: 5px 0;
            padding: 10px 15px;
            border-radius: 5px;
        }
    </style>
</head>
<body>

<div class="container">

    <h1>伪造的数据列表</h1>

    <%
        List<String> dataList = (List<String>) request.getAttribute("dataList");
        if (dataList == null || dataList.isEmpty()) {
    %>
    <div class="alert alert-danger" role="alert">
        数据为空或未传递！
    </div>
    <%
    } else {
    %>
    <ul>
        <%
            for (String item : dataList) {
        %>
        <li class="list-group-item"><%= item %></li>
        <%
            }
        %>
    </ul>
    <%
        }
    %>

    <div class="text-center mt-4">
        <a href="javascript:history.back()" class="btn btn-primary">返回</a>
    </div>

</div>

<!-- 引入 Bootstrap JS（可选） -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>